package com.ruoyi.house.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.WebmagicBuildingMapper;
import com.ruoyi.house.domain.WebmagicBuilding;
import com.ruoyi.house.service.IWebmagicBuildingService;
import com.ruoyi.common.core.text.Convert;

/**
 * 楼宇Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-09
 */
@Service
public class WebmagicBuildingServiceImpl implements IWebmagicBuildingService 
{
    @Autowired
    private WebmagicBuildingMapper webmagicBuildingMapper;

    /**
     * 查询楼宇
     * 
     * @param id 楼宇主键
     * @return 楼宇
     */
    @Override
    public WebmagicBuilding selectWebmagicBuildingById(Long id)
    {
        return webmagicBuildingMapper.selectWebmagicBuildingById(id);
    }

    /**
     * 查询楼宇列表
     * 
     * @param webmagicBuilding 楼宇
     * @return 楼宇
     */
    @Override
    public List<WebmagicBuilding> selectWebmagicBuildingList(WebmagicBuilding webmagicBuilding)
    {
        return webmagicBuildingMapper.selectWebmagicBuildingList(webmagicBuilding);
    }

    /**
     * 新增楼宇
     * 
     * @param webmagicBuilding 楼宇
     * @return 结果
     */
    @Override
    public int insertWebmagicBuilding(WebmagicBuilding webmagicBuilding)
    {
        return webmagicBuildingMapper.insertWebmagicBuilding(webmagicBuilding);
    }

    /**
     * 修改楼宇
     * 
     * @param webmagicBuilding 楼宇
     * @return 结果
     */
    @Override
    public int updateWebmagicBuilding(WebmagicBuilding webmagicBuilding)
    {
        return webmagicBuildingMapper.updateWebmagicBuilding(webmagicBuilding);
    }

    /**
     * 批量删除楼宇
     * 
     * @param ids 需要删除的楼宇主键
     * @return 结果
     */
    @Override
    public int deleteWebmagicBuildingByIds(String ids)
    {
        return webmagicBuildingMapper.deleteWebmagicBuildingByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除楼宇信息
     * 
     * @param id 楼宇主键
     * @return 结果
     */
    @Override
    public int deleteWebmagicBuildingById(Long id)
    {
        return webmagicBuildingMapper.deleteWebmagicBuildingById(id);
    }
}
